<template>
	<view class="content">
		<u-swiper :list="banner" height="434rpx" keyName="img" :autoplay="false"></u-swiper>

		<!-- 	<navigator url="/pages/shop/shop">商城</navigator>
		 -->
		<view class="nav">
			<view class="item">
				<view class="icon">
					<text class="iconfont icon-uni-icons-bars"></text>
				</view>
				<view class="text">
					社区
				</view>
			</view>
			<view class="item" @click="navTo('/pages/shop/shop')">
				<view class="icon">
					<text class="iconfont icon-shangcheng"></text>
				</view>
				<view class="text">
					商城
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		get_ad
	} from '@/api/ad.js'
	export default {
		data() {
			return {
				banner: []
			}
		},
		onLoad() {
			this.get_banner()
		},
		methods: {
			get_banner() {
				get_ad().then(res => {
					console.log(res)
					this.banner = res
				})
			}
		}

	}
</script>

<style lang="scss">
	.nav {
		@include flex(space-around);
		width: 100%;
		padding: 20rpx;
		item{
			@include flex();
			
		}
		.icon{
			text-align: center;
		}
	}
</style>
